package com.ruoyi.system.service.impl;

import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.yaoke.SysBuilding;
import com.ruoyi.system.mapper.SysBuildingMapper;
import com.ruoyi.system.mapper.SysPostMapper;
import com.ruoyi.system.mapper.SysUserPostMapper;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.yaoke.ISysBuildingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 楼栋 服务层处理
 * 
 * @author yaoke
 */
@Service
public class SysBuildingServiceImpl implements ISysBuildingService
{
    @Autowired
    private SysBuildingMapper sysBuildingMapper;


    /**
     * 查询岗集合
     *
     */
    @Override
    public List<SysBuilding> selectBuildingList(SysBuilding building)
    {
        return sysBuildingMapper.selectBuildingList(building);
    }

    /**
     * 查询所有
     */
    @Override
    public List<SysBuilding> selectBuildingAll()
    {
        return sysBuildingMapper.selectBuildingAll();
    }

    @Override
    public SysBuilding selectBuildingById(Long banId)
    {
        return sysBuildingMapper.selectBuildingById(banId);
    }


    /**
     * 删除
     *
     */
    @Override
    public int deleteBuildingById(Long banId)
    {
        return sysBuildingMapper.deleteBuildingById(banId);
    }

    /**
     * 批量删除
     *
     */
    @Override
    public int deleteBuildingByIds(Long[] banIds)
    {
        return sysBuildingMapper.deleteBuildingByIds(banIds);
    }

    /**
     * 新增保存
     *
     */
    @Override
    public int insertBuilding(SysBuilding building)
    {
        return sysBuildingMapper.insertBuilding(building);
    }

    /**
     * 修改保存
     *
     */
    @Override
    public int updateBuilding(SysBuilding building)
    {
        return sysBuildingMapper.updateBuilding(building);
    }
}
